package com.shuma.auth.model.dto;


import com.shuma.auth.model.po.ProductMarket;
import com.shuma.auth.model.po.UserProduct;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.List;

@Data
public class AddProductDto {
    /**
     *   "name":"飞鹤奶粉",
     *   "picture":"http...",
     *   "description":"...",
     *    "typeId":"1-1"
     *   "categoryId":"1-1-1",
     *   "supplierName":"zs",
     *   "supplierPhone":"12256398192",
     *   "serviceGuarantee":"。。。",
     *    "productMarketList":[{
     * "purchaseType":0,
     *        "integralAmount":100,
     *        "cashPrice":40,
     * },.....],
     *   "exchangeRestrictions":"1",
     *   "cityBlacklist":["长沙市","衡阳市"],
     *   "cityWhitelist":["岳阳市","武汉市"],
     *   "timeOn":"2024-6-14 00:00:00",
     *   "timeOff":"2024-6-14 12:00:00"
     *   "proxy_ids":["11","12"]
     */

    //必须
    private String name;
    private String picture;
    private String description;
    private String typeId;
    private String categoryId;
    private String supplierName;
    private String supplierPhone;
    private String serviceGuarantee;
    private List<ProductMarket> productMarketList;
    private Long stock;
    private Long exchangeRestriction;
    private String cityBlackList;
    private String cityWhiteList;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime timeOn;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime timeOff;
    private List<UserProduct> proxyUserInfoDtos;
}
